package com.pinkpig.excel.row;


import com.pinkpig.excel.metadata.TableMetaData;
import com.pinkpig.excel.row.model.IndexHeadRowModel;
import com.pinkpig.excel.row.model.RowModel;

import java.util.ArrayList;
import java.util.List;

/**
 * @author vincenfeng
 */
public class IndexHeadRowModelBuilder implements RowModelBuilder<TableMetaData> {

    private static List<RowModel> indexHeadRowModels;

    @Override
    public List<RowModel> build(TableMetaData tableMetaData){
        if(null==indexHeadRowModels){
            indexHeadRowModels = new ArrayList<>();
            IndexHeadRowModel indexHeadRowModel = new IndexHeadRowModel();
            indexHeadRowModels.add(indexHeadRowModel);
        }
        return indexHeadRowModels;
    }

}
